/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cashmate.struts;

import com.opensymphony.xwork2.ActionSupport;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

/**
 *
 * @author Sarah
 */

public class NewCollection extends ActionSupport {

    private String loc;

    public String getLoc() {
        return loc;
    }

    @Action(value = "/new-coll", results = {
        @Result(name = "input", location = "${loc}"),
        @Result(name = "success", location = "${loc}")
    })
    @Override
    public String execute() {
        try {
            loc = "../../loancollection.jsp?cat=coll";

            System.out.println("sa new collection eto");

            return SUCCESS;

        } catch (Exception e) {
            System.out.println("viewcollectionerr:" + e.toString());
        }
        return SUCCESS;
    }
}
